# -*- Makefile -*-
#
# Makefile generic
#
#
ifndef ARCHDIR
OS = $(shell /bin/uname | sed s/-.*//)
ifeq ($(OS), CYGWIN_NT)
ARCHDIR=Cygwin
else
 ifeq ($(OS), Linux)
ARCHDIR=Linux
 endif
endif
endif

include $(RTMEUSDIR)/src/Makefile.$(ARCHDIR)

CXXFLAGS = `rtm-config --cflags` -I$(RTMEUSDIR)/src/common -Wall -O2
LDFLAGS  = `rtm-config --libs` 
SHFLAGS  = -shared
RTMVER = $(shell rtm-config --version)

IDLC     = `rtm-config --idlc`
ifeq ($(RTMVER), 1.1.0)
	IDLFLAGS = `rtm-config --idlflags` -I`rtm-config --prefix`/include/openrtm-1.1/rtm/idl
else
	IDLFLAGS = `rtm-config --idlflags` -I`rtm-config --prefix`/include/rtm/idl
endif
WRAPPER  = rtm-skelwrapper
WRAPPER_FLAGS = --include-dir="" --skel-suffix=Skel --stub-suffix=Stub

OBJDIR    = $(RTMEUSDIR)/RTMEus/$(ARCHDIR)/obj
BINDIR    = $(RTMEUSDIR)/RTMEus/$(ARCHDIR)/bin
LIBDIR    = $(RTMEUSDIR)/RTMEus/$(ARCHDIR)/lib
.SUFFIXES: .so .cpp .o $(LSFX) $(OBJDIR).o $(LIBDIR).so



